diff options
| author | Fuwn <[email protected]> | 2026-01-23 21:26:36 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-01-23 21:26:36 -0800 |
| commit | e30cc3795166a372876969fd83b813472043b48b (patch) | |
| tree | fc672e36c5d64a804963029a9fe8cc413fc4c220 /src/routes/user/[user]/+page.svelte | |
| parent | fix(stores): Use unknown cast for dynamic property access (diff) | |
| download | due.moe-e30cc3795166a372876969fd83b813472043b48b.tar.xz due.moe-e30cc3795166a372876969fd83b813472043b48b.zip | |
fix: Add null guards and improve error messaging for user lookups
Diffstat (limited to 'src/routes/user/[user]/+page.svelte')
| -rw-r--r-- | src/routes/user/[user]/+page.svelte | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/routes/user/[user]/+page.svelte b/src/routes/user/[user]/+page.svelte index 7f33f170..eeeebf91 100644 --- a/src/routes/user/[user]/+page.svelte +++ b/src/routes/user/[user]/+page.svelte @@ -26,7 +26,9 @@ export let data; $: ({ Profile } = data); - $: preferences = $Profile.fetching ? undefined : ($Profile.data?.User.preferences as Preferences); + $: preferences = $Profile.fetching + ? undefined + : ($Profile.data?.User?.preferences as Preferences | undefined); const setCategoriesQuery = graphql(` mutation SetCategories($categories: [String!]!) { |